@page
@{ Layout = "_LayoutHome"; }
@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }
        body,body {
            padding: 0;
            margin: 0;
        }
    </style>
}
   <div class="rounded-0 shadow p-3 bg-white sticky-top">
        <div class="fw-bolder text-center">
            模拟考试
        </div>
    </div>
    <div class="p-5">
        <div>
        <el-form v-on:submit.native.prevent :inline="true" :model="form">
            <el-form-item label="">
                <el-input prefix-icon="el-icon-search" v-model="form.keyWords" placeholder="关键字"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button icon="el-icon-search" v-on:click="btnSearchClick">查 询</el-button>
            </el-form-item>
        </el-form>
            </div>
             <div v-if="total>0" class="mt-5">
        <div class="d-flex align-items-center my-3 pb-3 border border-start-0 border-end-0 border-top-0 card-hover-bg-title" style="cursor:pointer;" v-for="(paper,index) in list"  v-on:click="btnViewClick(paper.id)">
            <div class="position-relative">
                <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.91962 8.7141C8.49508 7.38938 9.47567 6 10.8668 6H37.1332C38.5243 6 39.5049 7.38938 39.0804 8.7141C37.8993 12.3995 36 19.0894 36 24C36 28.9106 37.8993 35.6005 39.0804 39.2859C39.5049 40.6106 38.5243 42 37.1332 42H10.8668C9.47567 42 8.49508 40.6106 8.91962 39.2859C10.1007 35.6005 12 28.9106 12 24C12 19.0894 10.1007 12.3995 8.91962 8.7141Z" fill="none" stroke="#333" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 15C5.5 17 5.99988 21 5.99988 24C5.99988 27 5.5 31 4 33" stroke="#333" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" /><path d="M18 15.5H30" stroke="#333" stroke-width="1" stroke-linecap="round" /><path d="M18 24H30" stroke="#333" stroke-width="1" stroke-linecap="round" /><path d="M18 32H22" stroke="#333" stroke-width="1" stroke-linecap="round" /><path d="M44 15C42.5 17 42.0001 21 42.0001 24C42.0001 27 42.5 30 44 33" stroke="#333" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" /></svg>
                <span class="position-absolute top-50 start-100 translate-middle ms-2 mt-2 card-title">.{{ index+1 }}</span>
            </div>
            <div class="ps-8">
                <div class="mb-3">
                    <span class="card-title">{{ paper.title }}</span>
                </div>
                <ul class="list-inline fw-light m-0 d-flex align-items-center">
               <li class="list-inline-item">
                        总分：{{paper.totalScore}}
                    </li>
                    <li class="list-inline-item">
                        及格分：{{paper.passScore}}
                    </li>
                    <li class="list-inline-item">
                        开考时间：<span class="text-warning fw-bold">{{ paper.examStartDateTimeStr }}</span>
                    </li>
                    <li class="list-inline-item">
                        剩余模拟次数：
                        <span class="text-success fw-bold" v-if="(paper.userExamTimes-paper.myExamTimes)>0">
                            {{paper.userExamTimes-paper.myExamTimes}}
                        </span>
                        <span class="text-danger fw-bold" v-else>
                            0
                        </span>
                        /{{paper.userExamTimes}}
                    </li>
                </ul>
            </div>
          <div class="ms-auto d-flex align-items-center">
                <el-tag :type="paper.paperStatus" effect="dark" class="rounded-pill px-3"><i class="el-icon-info me-2"></i>{{ paper.paperStatusStr }}</el-tag>
            </div>
        </div>

        <div class="my-5 text-center">
            <el-button class="border-0 rounded-pill" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
            <small v-else>没有更多了</small>
        </div>
    </div>
    <div class="pt-10" v-else>
        <el-empty></el-empty>
    </div>
    </div>

@section Scripts{
    <script src="/sitefiles/assets/js/home/exam/examPaperMoni.js" type="text/javascript"></script>
}